<nav class="navbar navbar-default">
  <div class="container">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="/">微信爬虫</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li {% ifequal active_nav "wechats" %}class="active"{% endifequal %}><a href="{% url 'wechat.index' %}">公众号<span class="sr-only">(current)</span></a></li>
        <li {% ifequal active_nav "keywords" %}class="active"{% endifequal %}><a href="{% url 'wechat.keywords_list' %}">关键词</a></li>
        <li {% ifequal active_nav "topics" %}class="active"{% endifequal %}><a href="{% url 'wechat.topic_list' %}">最新文章</a></li>
        <li {% ifequal active_nav "topics_available" %}class="active"{% endifequal %}><a href="{% url 'wechat.topic_available_list' %}">可用项目</a></li>

      </ul>
      {% if downloader >= 0 %}
      <ul class="nav navbar-nav navbar-right">
          <li><a>等待下载: {{ downloader }}</a></li>
          <li><a>禁爬数: {{ antispider }}</a></li>
          <li><a>代理状态: {{ proxy_status }}</a></li>
          <li><a href="/admin/">后台管理</a></li>
          <li><a target="_blank" href="http://supervisor-ops.bowenpay.com/">进程控制</a></li>
      </ul>
      {% endif %}
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>
